<?php
include_once("Accounts.config.php");

include_once("Security/SingleSignOn.php");
$SSO = new SingleSignOn;	

include_once("Identity/User.php");
$user = new user;	

//Get the session info
$SessionInfo = $SSO->getSessionInformation();


if($_GET['resent'] == "yes") {
	$message = '<span style="color:green;">Email Resent</span>';
}
elseif ($_GET['resent'] == "no") {
	$message = '<span style="color:red;">We are sorry but we could not resend your email.  If you do not recieve an email within 24 hours, then please notify the church office.</span>';
}

?>

<b>Congratulations, you have created your account!</b><br><br>
You should recieve an email with your account name and temporary password.<br><br>  
If you don't recieved an email, then <a href="index.php?action=resendTemporaryPasswordEmail&email=<?php print $_GET['email'] ?>">click here</a>.
<?php if(isset($message)) { print "<br><br>".$message; } ?>
<br>
<br>
As soon as you recieve your email, login below using your username and temporary password.
<br>
<br>
<table cellpadding="0" cellspacing="0" width="100%">
	<tr>
		<td>
			<?php 
				if(!isset($SessionInfo) || $SessionInfo['session_key'] == '') {
					print $SSO->handleLoginError();
				}
			 ?>			
		</td>
	</tr>
	<tr>
		<td>
			<?php 		
				if(!isset($SessionInfo) || $SessionInfo['session_key'] == '') {
					print $SSO->createLoginPrompt("index.php?action=newSuccess");
				}
				else {
					print '<br><br><em>You are logged in successfully.  You can continue to <a href="/Portal/index.php">LWOnline</a>.</em>';
				}
			 ?>
		</td>
	</tr>
</table>
<br>
<br>
<br>
<br>
<br>
<br>
